package com.yangyouli.unity_demo_server.service;

import java.util.List;

import com.yangyouli.unity_demo_server.entity.Friends;
import com.yangyouli.unity_demo_server.entity.FriendsVO;
import com.yangyouli.unity_demo_server.util.Page;
import com.yangyouli.unity_demo_server.util.PageWithData;

public interface FriendsService {
	/**
	 * -1 已和该用户为好友 1 成功 0 失败
	 * @param friends
	 * @return
	 */
	int addFriends (Friends friends);
	int deleteFriends (Friends friends);
	List<FriendsVO> findFriends (int userId);
	/**
	 * 根据输入的名字模糊查找符合要求的用户
	 * @param name
	 * @param page
	 * @return
	 */
	PageWithData<String, FriendsVO> findUserByName (Page<String> page);
	Friends find (Friends friend);
	/**
	 * 根据用户 id 查找用户
	 * @param userId
	 * @return
	 */
	FriendsVO findByUserId (int userId);
}
